package com.cloudpolice.door.feignInterface.hystric;

import com.cloudpolice.door.feignInterface.EquipmentAdvertisingInterFace;
import lh.model.ResultVO;
import lh.model.ResultVOPage;
import lh.units.ResultStruct;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * @author ：梁昊，后端工程师：flyman5，前端工程师：孙耀
 * @create 2020-04-02 12:44
 * @function
 * @editLog
 */
@Service
public class EquipmentAdvertisingInterFaceHystric implements EquipmentAdvertisingInterFace {
    private final String hystricMessage = "亲，服务器正忙，请稍后再戳。";
    @Override
    public ResultVO insertEquipmentAdvertising(@RequestParam(value = "id") String id
            , @RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId") String periodId
            , @RequestParam(value = "sortNo") int sortNo
            , @RequestParam(value = "beginDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginDate
            , @RequestParam(value = "endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate) {
        return ResultStruct.error(hystricMessage, ResultVO.class, int.class);
    }

    @Override
    public ResultVO updateEquipmentAdvertisingById(String id, String communityId, String periodId, int sortNo, Date beginDate, Date endDate) {
        return ResultStruct.error(hystricMessage, ResultVO.class, int.class);
    }

    @Override
    public int deleteEquipmentAdvertisingById(@RequestParam(value = "id",required = false) String id
            , @RequestParam(value = "communityId", required = false) String communityId
            , @RequestParam(value = "periodId", required = false) String periodId) {
        return 0;
    }

    @Override
    public int deleteEquipmentAdvertisingAuto() {
        return 0;
    }


    @Override
    public ResultVOPage selectEquipmentAdvertising(@RequestParam(value = "communityId") String communityId
            , @RequestParam(value = "periodId") String periodId
    ) {
        return ResultStruct.error(hystricMessage, ResultVOPage.class, null);
    }
}
